home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / tp5patch.arc / TP5INC.PAT < prev   
Text File  |  1991-04-28  |  3KB  |  111 lines

  1. Title: PATCH FOR INCLUDE FILE NOT FOUND BY TURBO DEBUGGER
  2.  
  3. This handout describes the patches needed in order for Turbo
  4. Pascal version 5.0 to generate the correct debug information so
  5. that an $Include file in a user defined unit can be found by 
  6. Turbo Debugger.  Two patches are supplied, one for TURBO.EXE, one
  7. for TPC.EXE.  Both patches should be made using the DOS utility,
  8. DEBUG on copies of the original .EXE files.
  9.  
  10. Notes:BEGIN NUMBERED
  11. DEBUG is not case sensitive to upper and lower case.  All
  12. addresses are listed in upper case for ease of readability.  All
  13. addresses are in hexidecimal.
  14.  
  15. While in DEBUG, the prompt will appear as a dash (-).
  16.  
  17. If you do not receive the appropriate response, press "q"
  18. followed by <Return>, to quit.  
  19. END NUMBERED
  20.  
  21.  
  22. TURBO.EXE Patch
  23.  
  24. BEGIN NUMBERED
  25. Rename TURBO.EXE to TURBO.BIN (DEBUG will not allow modifications
  26. to be made to an .EXE file.)
  27.  
  28.         Prompt>ren turbo.exe turbo.bin <Return>
  29.  
  30. Load TURBO.BIN into DEBUG with the command:
  31.  
  32.         Prompt>debug turbo.bin <Return>
  33.  
  34. Display the registers by entering "r" at DEBUG's hyphen prompt.
  35.  
  36.         -r <Return>
  37.  
  38.     The system will resond with a display of the CPU register
  39. values.  The following is an example
  40.  
  41.     AX=0000  BX=0000  CX=0000  DX=0000  SP=FFEE  BP=0000 ...
  42.     DS=3C23  ES=3C23  SS=3C23  CS=3C23  IP=0100  NV UP   ...
  43.  
  44.     Note the value of the CS register.  Add 1000h to this value
  45. mentally.  e.g. in the above example CS=3C23, then CS + 1000h is
  46. 4C23.  This value will be referenced by ????.
  47.  
  48. At DEBUG's hyphen prompt type:
  49.  
  50.         -a ????:A41E <Return>
  51.  
  52. Enter the following Assembler code when the address is displayed.
  53.  
  54.         ????:A41E cmp si,dx <Return>
  55.  
  56. Press <Return> a second time.
  57.  
  58. Write the modified code to disk by entering the following at the
  59. prompt.
  60.  
  61.         -w <Return>
  62.  
  63. Quit DEBUG by entering the following -
  64.  
  65.         -q <Return>
  66.  
  67. At the DOS prompt, rename the .BIN file back to the .EXE file
  68. with the following command.
  69.  
  70.         Prompt>ren turbo.bin turbo.exe <Return>
  71. END NUMBERED
  72.  
  73.  
  74.  
  75. TPC.EXE Patch
  76.  
  77. BEGIN NUMBERED
  78. Rename TPC.EXE to TPC.BIN (DEBUG will not allow modifications to
  79. be made to an .EXE file.)
  80.  
  81.         Prompt>ren tpc.exe tpc.bin <Return>
  82.  
  83. Load TPC.BIN into DEBUG with the command:
  84.  
  85.         Prompt>debug tpc.bin <Return>
  86.  
  87. At DEBUG's hyphen prompt type:
  88.  
  89.         -a a5d3 <Return>
  90.  
  91. Enter the following Assembler code when the address is displayed
  92.  
  93.         XXXX:A5D3 cmp si,dx <Return>
  94.  
  95. Press <Return> a second time.
  96.  
  97. Write the modified code to disk by entering the following at the
  98. prompt.
  99.  
  100.         -w <Return>
  101.  
  102. Quit DEBUG by entering the following -
  103.  
  104.         -q <Return>
  105.  
  106. At the DOS prompt, rename the .BIN file back to the .EXE file
  107. with the following command.
  108.  
  109.         Prompt>ren tpc.bin tpc.exe <Return>
  110. END NUMBERED
  111.